const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('project', {
    projectID: {
      type: DataTypes.STRING(50),
      allowNull: false
    },
    projectNum: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    projectName: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    region: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    address: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    projectType: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    structType: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    projectCost: {
      type: DataTypes.DOUBLE,
      allowNull: true
    },
    area: {
      type: DataTypes.DOUBLE,
      allowNull: true
    },
    floorUp: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    floorDown: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    beginDate: {
      type: DataTypes.DATE,
      allowNull: true
    },
    endDate: {
      type: DataTypes.DATE,
      allowNull: true
    },
    projectStatus: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    projectXXJD: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    planXkz: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    sgtsNo: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    sgxkzh: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    bjDate: {
      type: DataTypes.DATE,
      allowNull: true
    },
    bjMan: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    subjectName: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    subjectID: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    province: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    city: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    subjectNum: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    subdistrict: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    schedule: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    singleProjNum: {
      type: DataTypes.TEXT,
      allowNull: true
    }
  }, {
    sequelize,
    tableName: 'project',
    timestamps: false
  });
};
